﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BaseEntities;
using BusinessLogic;

namespace Mock1Group6
{
    public partial class Withdraw : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        WithdrawLogic wt = new WithdrawLogic();
        public string abc123 { get; set; }
        protected void Button1_Click(object sender, EventArgs e)
        {
            decimal amount = 500000;
            string cardNo= abc123;
            if ((WithdrawLogic.CheckWithdrawCash(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMinMaxValue(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMod(amount, cardNo) == true))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Withdraw success');", true);
                Response.Redirect("trang rut hoa don");
                //WithdrawLogic.WriteLog();
            }
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            decimal amount = 1500000;
            string cardNo = abc123;
            if ((WithdrawLogic.CheckWithdrawCash(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMinMaxValue(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMod(amount, cardNo) == true))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Withdraw success');", true);
                Response.Redirect("trang rut hoa don");
                //WithdrawLogic.WriteLog();
            }
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            decimal amount = 2500000;
            string cardNo = abc123;
            if ((WithdrawLogic.CheckWithdrawCash(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMinMaxValue(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMod(amount, cardNo) == true))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Withdraw success');", true);
                Response.Redirect("trang rut hoa don");
                //WithdrawLogic.WriteLog();
            }
        }

        protected void Button4_Click(object sender, EventArgs e)
        {
            decimal amount = 1000000;
            string cardNo = abc123;
            if ((WithdrawLogic.CheckWithdrawCash(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMinMaxValue(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMod(amount, cardNo) == true))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Withdraw success');", true);
                Response.Redirect("trang rut hoa don");
                //WithdrawLogic.WriteLog();
            }
        }

        protected void Button5_Click(object sender, EventArgs e)
        {
            decimal amount = 2000000;
            string cardNo = abc123;
            if ((WithdrawLogic.CheckWithdrawCash(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMinMaxValue(amount, cardNo) == true) &&
                (WithdrawLogic.CheckCashWithMod(amount, cardNo) == true))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Withdraw success');", true);
                Response.Redirect("trang rut hoa don");
                //WithdrawLogic.WriteLog();
            }
        }

        protected void Button6_Click(object sender, EventArgs e)
        {
            Response.Redirect("Withdraw2.aspx");
        }

    }
}